import 'package:daoyi_admin_ui_getx/app/data/cache_keys.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/foundation.dart';
import 'package:get/get.dart';

class AuthController extends GetxController {
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    super.onClose();
  }

  bool isLogin() {
    bool? hasAuth = SpUtil.getBool(CacheKeys.authIsLogin);
    if (kDebugMode) {
      print("isLogin() $hasAuth");
    }
    return hasAuth ?? false;
  }
}
